<?php
session_start();

if(isset($_SESSION['user'])){
	header('location: index.php');
	exit;
}

// Error checking
$error = Null;
if($_GET && isset($_GET['f'])){
  $error = "Invalid username/password combination";
}
?>

<?php require_once("header.php"); ?>

			<div id = "header">
			
				<div id = "leftcol">
						Lifeprice yay
				</div>
				
				<div id = "rightcol">
        <?php
          if(isset($error)){
            echo '<div class="error">' . $error . '</div>';
          }
        ?>
					<table id = "lol">		
					<form method="post" action="dologin.php">
						<tr>
							<td>Username: </td> <td><input name="username" type="text" /> </td>
						</tr>
						<tr>
							<td>Password: </td> <td><input name="password" type="password" /></td> <td><input type="submit" value="Login" /></td>
						</tr>	
					</form>
						<tr>
							<td colspan = "2"><a href="createaccount.php">Create Account</a></td>
						</tr>
					</table>
				</div>
				
			</div><!--header end -->

<?php require_once("footer.php");